package ynu.edu.Controller;

import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import ynu.edu.Service.Impl.CameraService;

@RestController
@RequestMapping("/camera")
public class CameraController {
    @Resource
    CameraService cameraService;
    @GetMapping("/GetToken")
    public String GetToken(){
        System.out.println(cameraService.GetToken());
        return cameraService.GetToken();
    }
    @GetMapping("/FetchUrl")
    public String fetchUrl(){
        return cameraService.getCamerasCreatedInLastMonth().toString();
    }
}
